/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jh.query.jquery;

import java.util.ArrayList;
import java.util.List;



/**
 *
 * @author namhh
 */
public class main {

    public static void main(String[] args) {
        BCol bCol1 = new BCol("A", 1);
        BCol bCol2 = new BCol("B", (Double).6876);
        BTable bTable = new BTable("AB");
        bTable.addCol(bCol1).addCol(bCol2).addCol(bCol2);
        List l = new ArrayList();
        l.add(bCol2);
        
        System.out.println(
                bTable.QUERY.setSelectedColumns(bCol1)
                        .setSelectedColumns(bCol2)
                        .addCondtion(BTable.TYPE.AND, bCol2, BTable.OPERATION.EQUAL, 1)
                        .join(bTable.QUERY, BTable.JOIN_TYPE.INNER_JOIN, l)
                        .toQueryString());
        System.out.println(bTable.QUERY.toQueryString());        
    }

}
